#pragma once

#include "includes.h"

/******util.c*******
 *
 */


int util_strlen(char *);
BOOL util_strncmp(char *, char *, int);
BOOL util_strcmp(char *, char *);
int util_strcpy(char *, char *);
void util_memcpy(void *, void *, int);
void util_zero(void *, int);
int util_atoi(char *, int);
char *util_itoa(int, int, char *);

//在内存中查找特定的字节序
int util_memsearch(char *, int, char *, int);

//在具体字符串中查找特定的子字符串，忽略大小写
int util_stristr(char *, int, char *);

//获取本地ip信息
ipv4_t util_local_addr(void);

//读取描述符fd对应文件中的字符串
char *util_fdgets(char *, int, int);

static inline int util_isupper(char);
static inline int util_isalpha(char);
static inline int util_isspace(char);
static inline int util_isdigit(char);

